xenpaging: unify return value in nominate and evict
authorOlaf Hering <olaf@aepfle.de>
Mon, 30 Jan 2012 12:06:34 +0000 (13:06 +0100)
committerOlaf Hering <olaf@aepfle.de>
Mon, 30 Jan 2012 12:06:34 +0000 (13:06 +0100)
commite47ceecc301c3d1123aaf2c6d95f214a6dda4e81
tree094784068704a10041f7d176ba655d4191b1721f
parentd3ec7b04d08dabb37bb09eb6876700f4f81f9392
xenpaging: unify return value in nominate and evict

Let p2m_mem_paging_nominate and p2m_mem_paging_evict return just one
error number. EINVAL is not very helpful in case of nominate, it can
happen if the pager tries to nominate a ballooned page. In this case the
gfn is not backed by a mfn, the pager can not know that.  Similar with
evict, anything can happen between nominate and evict.

This change helps the pager to decide if the returned error is from the
function itself, or if it happend earlier. In the latter case, it is
most likely fatal and should be handled as such.
nominate and evict return EBUSY, which is supposed to mean
"pager request reached target function, and failed."

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/p2m.c